export const menu_status = {
  '': '全部',
  1: '正常',
  2: '已停用'
  // 3: '已冻结'
}
export const companyTypeStr = {
  AG: '经营企业',
  FC: '生产企业',
  HO: '医疗机构',
  MM: '运营平台',
  SV: '服务商',
  AM: '三方服务/审计公司服务'
}
export const userManagement = [
  {width: '60px', type: 'index', label: '序号', align: 'center'},
  {minWidth: '130px', prop: 'name', label: '用户组名称', align: 'center'},
  {
    minWidth: '150px',
    prop: 'companyTypeStr',
    label: '企业类型',
    align: 'center',
    'show-overflow-tooltip': true
  },
  {
    minWidth: '120px',
    prop: 'status',
    label: '状态',
    align: 'center',
    formatter: row => {
      return menu_status[row.status]
    }
  },
  {
    minWidth: '120px',
    prop: 'defaultConfigStr',
    label: '默认配置',
    align: 'center'
  },
  {minWidth: '150px', prop: 'createdBy', label: '创建人', align: 'center'},
  {minWidth: '180px', prop: 'createdAt', label: '创建时间', align: 'center'}
]

export const approveStatus = [{lab: '停用', val: 0}, {lab: '启用', val: 1}]
export const defaultConfigData = [{lab: '是', val: '1'}, {lab: '否', val: '0'}]
export const companyTypeData = [
  {lab: '经营企业', val: 'AG'},
  {lab: '生产企业', val: 'FC'},
  {lab: '医疗机构', val: 'HO'},
  {lab: '运营平台', val: 'MM'},
  {lab: '服务商', val: 'SV'},
  {lab: '三方服务/审计公司服务', val: 'AM'}
]
// 用户组管理form
export const searchContent = [
  {
    key: 'name',
    title: '用户组名称',
    type: 'input',
    attr: {
      clearable: true,
      placeholder: '请输入'
    }
  },
  {
    key: 'companyType',
    title: '企业类型',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(companyTypeStr).map(item => {
      return {
        label: companyTypeStr[item],
        value: item
      }
    })
  },
  {
    key: 'status',
    title: '状态',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(menu_status).map(item => {
      return {
        label: menu_status[item],
        value: item
      }
    })
  },
  {
    key: 'name',
    title: '用户组名称',
    type: 'input',
    attr: {
      clearable: true,
      placeholder: '请输入'
    }
  },
  {
    key: 'companyType',
    title: '企业类型',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(companyTypeStr).map(item => {
      return {
        label: companyTypeStr[item],
        value: item
      }
    })
  },
  {
    key: 'status',
    title: '状态',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(menu_status).map(item => {
      return {
        label: menu_status[item],
        value: item
      }
    })
  },
  {
    key: 'createAt',
    title: '创建时间',
    type: 'time',
    fieldname: ['startTimeVarName', 'endTimeVarName'],
    attr: {
      class: 'daterange',
      type: 'daterange',
      'start-placeholder': '开始月份',
      'end-placeholder': '结束月份',
      'default-time': ['00:00:00', '23:59:59']
    }
  },
  {
    key: 'killBacteria',
    title: '是否灭菌',
    type: 'radio',
    attr: {
      placeholder: '请选择',
      style: 'margin-bottom: 13px;width:87px;',
      disabled: false
    },
    options: [
      {
        value: 1,
        label: '是'
      },
      {
        value: 0,
        label: '否'
      }
    ]
  }
  // {
  //   key: 'category',
  //   title: '产品分类',
  //   type: 'cascader',
  //   options: [],
  //   optionProps: {
  //     checkStrictly: true
  //   },
  //   attr: {
  //     placeholder: '请选择'
  //   }
  // },
  // {
  //   key: 'badge',
  //   title: '标记',
  //   type: 'badge',
  //   options: [
  //     {key: '001', label: '标记1', value: '001'},
  //     {key: '002', label: '标记2', value: '002'},
  //     {key: '003', label: '标记3', value: '003'}
  //   ],
  //   attr: {
  //     placeholder: '请选择'
  //   }
  // }
]
export const searchContentCompact = [
  {
    key: 'status',
    title: '状态',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(menu_status).map(item => {
      return {
        label: menu_status[item],
        value: item
      }
    })
  },
  {
    key: 'name',
    title: '用户组名称',
    type: 'input',
    attr: {
      clearable: true,
      placeholder: '请输入'
    }
  },
  {
    key: 'companyType',
    title: '企业类型',
    type: 'select',
    attr: {
      clearable: true,
      placeholder: '请选择'
    },
    options: Object.keys(companyTypeStr).map(item => {
      return {
        label: companyTypeStr[item],
        value: item
      }
    })
  }
  // {
  //   key: 'status',
  //   title: '状态',
  //   type: 'select',
  //   attr: {
  //     clearable: true,
  //     placeholder: '请选择'
  //   },
  //   options: Object.keys(menu_status).map(item => {
  //     return {
  //       label: menu_status[item],
  //       value: item
  //     }
  //   })
  // }
]
